b082826c0d7e8864a2af29802afc474dc160f0ef,app/src/main/java/com/zpauly/githubapp/view/repositories/RepoContentActivity.java,RepoContentActivity,setTagsDialog,#,285
Before Change
.items(tags)
.cancelable(false)
.positiveText(R.string.ok)
.negativeText(R.string.cancel)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Log.i(TAG, "ref = " + ref);
if (isRefChanged) {
loadRepo();
}
}
})
.onNegative(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
ref = preRef;
}
})
.itemsCallbackSingleChoice(-1, new MaterialDialog.ListCallbackSingleChoice() {
@Override
public boolean onSelection(MaterialDialog dialog, View itemView, int which, CharSequence text) {
if (which < tags.size() && which >= 0) {
After Change
.items(tags)
.cancelable(false)
.positiveText(R.string.ok)
.negativeText(R.string.cancel)
.itemsCallbackSingleChoice(-1, new MaterialDialog.ListCallbackSingleChoice() {
@Override
public boolean onSelection(MaterialDialog dialog, View itemView, int which, CharSequence text) {
if (which < tags.size() && which >= 0) {
if (!tags.get(which).equals(ref)) {
preRef = ref;
ref = tags.get(which);
mSRLayout.setRefreshing(true);
loadRepo();
}
}
return true;
}
})
.onNegative(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
ref = preRef;
}
})
.build();
}
private void setupSwipeRefreshLayout() {